/**  
 * All rights Reserved, Designed By Soywer   
 * @Title:  ManagerController.java   
 * @Package vinux.web.manager.controller   
 * @Description:    TODO(养老管理后台控制器)   
 * @author: Soywer     
 * @date:   2016年11月3日 下午3:01:51   
 * @version V1.0     
 */  
package vinux.web.manager.controller;

import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import vinux.service.common.base.BaseController;
import vinux.service.common.config.OpenUrlConfig;
import vinux.service.common.statics.Constant;
import vinux.service.core.utils.LoggerUtils;

/**   
 * @ClassName:  ManagerController   
 * @Description:TODO(养老管理后台控制器)   
 * @author: Soywer  
 * @date:   2016年11月3日 下午3:01:51   
 *      
 */ 
@Controller
@Scope(Constant.SCOPE)
@RequestMapping("/smanager/VinuxAgedcare")
public class ManagerController extends BaseController {
 
	/**
	 * 
	 * @Title: showManagerIndex   
	 * @Description: TODO(展示首页)   
	 * @param: @return      
	 * @return: ModelAndView      
	 * @throws
	 */
	@RequestMapping("index")
	public ModelAndView showManagerIndex(){
		ModelAndView m = new ModelAndView("/manager/index");
		return m;
	}
	
	@RequestMapping("loginOut")
	public ModelAndView loginOut(){
		//获取会员跳转登录url
		String memberLogin = OpenUrlConfig.getProperty("member.login");
		LoggerUtils.debug(getClass(), "********************开始清除token信息!********************");
		Subject subject = SecurityUtils.getSubject();
		subject.logout();
		LoggerUtils.debug(getClass(), "********************清除token信息完毕!********************");
		return redirect(memberLogin);
	}
}
